<?php


namespace App\Http\Controllers\Weapp;


use App\Model\GoodsView;
use App\Tool\Json;

class My extends Auth
{

    /**
     * 浏览记录
     * Create by Peter
     * 2020/05/27 13:46:42
     * Email:904801074@qq.com
     */
    function historyList(){

        $user_id = resolve('weapp_user')['id'];


        $list=GoodsView::where('user_id',$user_id)->with('goods.goods_sku')
            ->orderBy('time','desc');


        return Json::code(1,'success',paginate($list,request()->input('p',1)));

    }

}
